import React, {Component} from 'react';

class Base extends Component {


    constructor(props) {
        super(props);

        this.state = {
            style: props.style,
            data: props.data,
            selected: props.selected
        };

    }

    componentWillReceiveProps(nextProps) {
        const {selected} = nextProps;

        if (selected != this.state.selected) {
            this.setState({
                selected
            });
        }
    }
}

export default Base;
